
import sys
sys.path.append("luatool-master/luatool")

import luatool  # noqa


BAUD = 115200    # esp8266 default
DELAY_SEP = 0.3  # ESPlore default


class Pub2Serial:
    _path_proj = None

    @classmethod
    def execute(cls, luaf, serialport):
        trans = luatool.SerialTransport(serialport, BAUD, DELAY_SEP)
        with open(luaf, "rt") as fp:
            lines = fp.readlines()


if __name__ == "__main__":
    projpath = os.path.dirname(os.getcwd())
    Pub2Serial.execute(projpath)
